package com.aabte.design2.behavioral.visitor;

import lombok.Data;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/4
 */
@Data
public class Rectangle implements Shape {

    private int x;
    private int y;
    private int width;
    private int height;

    public Rectangle(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visitRectangle(this);
    }
}
